/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package cn.ac.iie.di.util;

import org.apache.log4j.Logger;

/**
 *
 * @author shipengfeng
 */
public class Monitor implements Runnable {

    public static Logger logger = Logger.getLogger(Monitor.class.getName());

    @Override
    public void run() {
        while (!GlobalParas.isShouldExit) {
            try {
                logger.info("Now, oriMsgPool size is : " + GlobalParas.oriMsgPool.size());
                Thread.sleep(3000);
            } catch (Exception e) {
                logger.error(e.getMessage(), e);
            }
        }
        logger.info("Monitor is stop OK");
    }
}
